#include "roommanager.h"

RoomManager::RoomManager()
{

}

RoomManager::~RoomManager()
{
//   roomMap.clear();
}

void RoomManager::appendRoom(QString& roomID, QString& host, Socket *anchor)
{
    roomMap[roomID] = new Room(roomID,host,anchor);
}

void RoomManager::removeRoom(QString& roomID)
{
    Room* room = roomMap[roomID];
    roomMap.remove(roomID);
    delete room;
}

QString& RoomManager::getRoomHost(QString& roomID)
{
    return roomMap[roomID]->getRoomHost();
}
